package zb.stream;

import java.util.stream.Stream;

/**
 * @author wzby
 * @Date: 2022/8/6 11:00
 */
public class Stream5 {
    public static void main(String[] args) {
        Stream<Integer> s = Stream.of(1,2,3,4,5,67,8,9);
        //升序.sorted()
        //s.sorted().forEach(System.out::println);
        //降序.sorted((a,b) -> b-a)
        s.sorted((a,b) -> b-a).forEach(System.out::println);
    }
}
